home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 April / CHIP CD (4 - 2007).iso / admin / nettool / NetStumblerInstaller_0_4_0.exe / NetStumbler.exe / SCRIPT / DEFAULT
Encoding:
Text File  |  2004-04-21  |  3.8 KB  |  135 lines

  1. ' default.vbs: Default NetStumbler event handler script.
  2. ' Copyright (c) Marius Milner 2002-2003.
  3. ' This file may not be redistributed without the author's permission.
  4.  
  5.  
  6. ' Called when user requests that scanning start, or when scanning is started automatically.
  7. 'Sub OnEnableScan
  8. '    PlaySound "SSROAM.WAV"
  9. 'End Sub
  10.  
  11.  
  12. ' Called when user requests that scanning stop.
  13. 'Sub OnDisableScan
  14. '    PlaySound "SSROAM.WAV"
  15. 'End Sub
  16.  
  17.  
  18. ' Called when a scan cycle is starting.
  19. 'Sub OnScanStart
  20. '    PlaySound "Windows XP Balloon.WAV"
  21. 'End Sub
  22.  
  23.  
  24. ' Called when a scan result is received.
  25. ' History: Supported since 0.4
  26. 'Sub OnScanResult(SSID, BSSID, CapFlags, Signal, Noise, LastSeen)
  27.     ' SSID : String : SSID (Network name)
  28.     ' BSSID : String : BSSID (MAC address)
  29.     ' CapFlags : Integer : 802.11 capability flags
  30.     ' Signal : Integer : signal level (dBm)
  31.     ' Noise : Integer : noise level(dBm)
  32.     ' LastSeen : Time : When this BSSID was last seen
  33.  
  34. 'End Sub
  35.  
  36.  
  37. ' Called when a scan cycle has completed (typically right before a new one starts).
  38. Sub OnScanComplete(FoundNew, SeenBefore, LostContact, BestSNR)
  39.     ' FoundNew : Integer : Count of new BSSIDs
  40.     ' SeenBefore : Integer : Count of not-new BSSIDs
  41.     ' LostContact : Integer : Count of BSSIDs missed since last scan
  42.     ' BestSNR : Integer : SNR of strongest signal (dBm)
  43.  
  44.     If FoundNew>0 Then
  45.         PlaySound "ns-aos-new.WAV"
  46.     ElseIf LostContact>0 Then
  47.         PlaySound "ns-los.WAV"
  48.     ElseIf SeenBefore>0 Then
  49.         ' Still seeing some
  50.         If BestSNR >= 60 Then
  51.             PlaySound "ns-signal-6.WAV"
  52.         ElseIf BestSNR >= 50 Then
  53.             PlaySound "ns-signal-5.WAV"
  54.         ElseIf BestSNR >= 40 Then
  55.             PlaySound "ns-signal-4.WAV"
  56.         ElseIf BestSNR >= 30 Then
  57.             PlaySound "ns-signal-3.WAV"
  58.         ElseIf BestSNR >= 20 Then
  59.             PlaySound "ns-signal-2.WAV"
  60.         ElseIf BestSNR >= 10 Then
  61.             PlaySound "ns-signal-1.WAV"
  62.         Else
  63.             PlaySound "ns-signal-0.WAV"
  64.         End If
  65.     Else
  66.         ' Nothing seen
  67. '        PlaySound "ns-tick.WAV"
  68.     End If
  69. End Sub
  70.  
  71.  
  72. Dim GPSOk
  73. GPSOk = True
  74.  
  75.  
  76. ' Called when GPS times out.
  77. Sub OnGPSTimeout
  78.     If GPSOk Then
  79.         GPSOk = False
  80.         PlaySound "ns-gps-err.WAV"
  81.     End If
  82. End Sub
  83.  
  84.  
  85. ' Called when GPS reports no fix.
  86. Sub OnGPSNoFix
  87.     If GPSOk Then
  88.         GPSOk = False
  89.         PlaySound "ns-gps-err.WAV"
  90.     End If
  91. End Sub
  92.  
  93.  
  94. ' Called when GPS reports position.
  95. Sub OnGPSPosition (Lat, Lon, Alt)
  96.     ' Lat : double : Latitude, degrees east
  97.     ' Lon : double : Longitude, degrees north
  98.     ' Alt : double : Altitude above sea level, meters
  99.     GPSOk = True
  100. End Sub
  101.  
  102.  
  103. ' Called when GPS reports speed.
  104. 'Sub OnGPSSpeed (Speed)
  105.     ' Speed : double : Speed, knots
  106. 'End Sub
  107.  
  108.  
  109. ' Called WHILE SCANNING ONLY when the IP address is reported to be changed.
  110. ' The IP address reported is the first one on the currently scanning adapter.
  111. ' NOTE: There are a number of cases where this function will get called but
  112. ' the IP address has not really changed - for example, the address changed
  113. ' on another adapter, or the IP routing or DNS information changed.
  114. ' Platforms supported: NetStumbler; MiniStumbler on PPC2002.
  115. ' History: New in 0.4.
  116. 'Sub OnIPChange (Addr, Mask)
  117.     ' Addr : String : IP address, dotted format
  118.     ' Mask : String : IP subnet mask, dotted format
  119. 'End Sub
  120.  
  121. ' Called to indicate that NetStumbler has changed its location information
  122. ' for a BSSID.
  123. ' History: New in 0.4.
  124. 'Sub OnPositionChange (SSID, BSSID, CapFlags, MaxSNR, Lat, Lon, Alt, FixType)
  125.     ' SSID : String : SSID (Network name)
  126.     ' BSSID : String : BSSID (MAC address)
  127.     ' CapFlags : Integer : 802.11 capability flags
  128.     ' MaxSNR: Integer : highest seen signal-to-noise ratio (dB) that had a position fix associated with it
  129.     ' Lat : Double : Newly calculated latitude, degrees
  130.     ' Lon : Double : Newly calculated longitude, degrees
  131.     ' Alt : Double : Newly calculated altitude (currently not calculated)
  132.     ' FixType : Integer : Reserved for future use.
  133. 'End Sub
  134.  
  135.